package com.fh.controller;

import com.fh.service.CategoryService;
import com.fh.vo.ResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/category")
@CrossOrigin
@Api(value = "分类",tags = "分类管理")
public class CategoryController {

    @Resource
    private CategoryService categoryService;

    @GetMapping("list")
    public ResultVo queryCategory(){
        return   categoryService.queryCategory();
    }

    @ApiOperation("查询推荐分类借口")
    @GetMapping("listCategoryProduct")
    public ResultVo selectCategoryProduct(){
        return   categoryService.selectCategoryProduct();
    }
}
